function openWinUpdate(customerId){
	var diag = new top.Dialog();
	diag.Title = "修改客户信息";
	diag.URL = base + "admin/customer/findById.action?customer.id=" + customerId;
	diag.Width=600;
	diag.Height=600;
	diag.CancelEvent = function(){
		diag.innerFrame.contentWindow.location.reload();
		diag.close();
	};
	diag.show();
	document.cookie="show=1";
}
function openWinFind(customerId){
	var diag = new top.Dialog();
	diag.ID="a1";
	diag.Title = "查看客户";
	diag.URL = base + "admin/customer/showInfoById.action?customer.id=" + customerId;
	diag.Width=550;
	diag.Height=500;
	diag.CancelEvent = function(){
		diag.innerFrame.contentWindow.location.reload();
		diag.close();
	};
	diag.show();
}
function select(customerId) {
	$.post(base + "admin/customer/findByCustomerId.action", {"customer.id": customerId}, function(data) {
		data=eval("(" + data+ ")");
		var topDoc = top.document.getElementById("frmright").contentWindow.document;
		topDoc.getElementById("customerId").value = data.id;
		topDoc.getElementById("username").innerText = data.userName;
		topDoc.getElementById("realName").innerText = data.realName;
		topDoc.getElementById("consigne").value = data.realName;
		topDoc.getElementById("telephone").value = data.telephone;
		topDoc.getElementById("email").innerText = data.email;
		topDoc.getElementById("pointValue").innerText = data.pointValue;
		topDoc.getElementById("credit").innerText = data.creditId;
		var email = topDoc.getElementById("email").scrollWidth;
		topDoc.getElementById("email").style.width = (email + 2) + "px";
		Dialog.close();
	});
}